#!/usr/bin/env python
# -*- coding: utf8 -*-
# title       :
# description :
# author      :'ShenMeng'
from .core._yamldatatodisk import YamlDataToDisk
import pymel.core as pm
import os


class LayoutAssetDataToDiskYaml(YamlDataToDisk):

    def scanScene(self):
        resultData = []
        refList = pm.listReferences()
        for ref in refList:
            resultData.append(self._getRefData(ref))

        return resultData

        
    def _getRefData(self, ref):
        nodeData = {}
        namespace = ref.namespace
        file_path = ref.path.replace("/", os.path.sep)
        nodeData["path"] = file_path
        nodeData["namespace"] = namespace
        return nodeData
        


